1. Field of the Invention
The present invention is related to memory management, and in particular, to methods and systems for accessing and managing nonvolatile memory, such as in a wireless phone.
2. Description of the Related Art
With the advent of smaller, faster and less power-consuming electronic components such as processors, memories and ASICs, many cellular phones provide increasingly complex capabilities such as multimedia information and entertainment, commonly referred to as the “applications”. A cellular phone further includes wireless communication modulation/demodulation capabilities, commonly referred to as the “modem”. To handle the modem and the application functions, many cellular phone designs include two processors whereby the “application processor” controls the application functions and the “modem processor” controls the communication functions. Some cellular phones include yet another processor specifically designed to perform digital signal processing (DSP) algorithms. Although single-processor cellular phones do exist, many current complex cellular phones include multiple processors. In many conventional applications, each processor utilizes both non-volatile and volatile memory to perform their functions.
In addition, traditionally, NOR Flash memory has been commonly used as the cellular phone's non-volatile memory. In recent years, several new Flash memory technologies have emerged on the market. These relatively new high density Flash memories, such as AND Flash memory and NAND Flash memory, are designed to have lower costs, smaller sizes and higher storage capacities than NOR Flash memory. Thus high density Flash memory technology is often the preferred technology for non-volatile mass data storage in complex cellular phones. However, many conventional cellular phones that currently use NOR Flash cannot use AND or NAND Flash memory as a drop-in replacement without making design and/or circuit board modification. This is because these high-density Flash technologies have different characteristics than NOR Flash memory, and so necessitate special treatment.
For example, high-density Flash memory is typically accessed in page-mode, with significant initial access time, and thus is not suitable for a processor to execute program code out of, as processor's typically need random-access on a byte or word level. Therefore, program code stored in high-density Flash memory is usually first moved to RAM memory and then the processor executes the program codes from the RAM. In addition, high-density Flash memory often has a higher probability of introducing errors to the data stored therein as compared to NOR Flash memory, and thus Error Correction Coding (ECC) often needs to be applied when accessing the high-density Flash. Further, high-density Flash memory typically can only endure a limited number of erase-rewrite cycles. Flash media management techniques such as wear-leveling, garbage collection, bad-block replacement and power-failure recovery are often employed to increase the endurance and reliability of these Flash memory devices.
To take advantage of high-density Flash technologies, many cellular phone system designs have incorporated very complex Flash media management algorithms and procedures in the system software to accommodate the above-mentioned special characteristics of the high-density Flash. These complex algorithms and procedures use up plenty of computational/control capacity of the Flash-accessing processor and thus degrade the performance of the system. Therefore, it would be advantageous to have a control circuit included in the cellular phone where the control circuit performs the algorithms and procedures of the Flash media management techniques as well as ECC and releases the Flash-accessing processor from such duties.
In an electronic system which includes a processor, non-volatile memory and volatile memory, a task commonly performed by the processor is moving data from one memory to another. An example data movement operation involves moving program code from a non-volatile page-mode memory device to a volatile random access memory device to allow the processor to execute the program code. Another example data movement operation involves moving data from volatile memory to nonvolatile memory to thereby permanently store the data. Furthermore, in cellular phones which provide multimedia functions, such as graphics and video, the processor(s) often moves image data from memories to the cellular phone display (e.g., an LCD display) to thereby display images. Moving data in and out of memories is a very repetitive process which consumes a large amount of processor computational/control capacity.